import request from '@/utils/request'

export function getList (parameter) {
  return request({
    url: '/v2/boss/project/cost/config/list',
    method: 'post',
    data: parameter
  })
}
export function add (parameter) {
  return request({
    url: '/v2/boss/project/cost/config/add',
    method: 'post',
    data: parameter
  })
}
export function updata (parameter) {
  return request({
    url: '/v2/boss/project/cost/config/update',
    method: 'post',
    data: parameter
  })
}
export function toggleStatus (parameter) {
  return request({
    url: '/v2/boss/project/cost/config/updateStatus',
    method: 'post',
    data: parameter
  })
}
export function expenseImport (parameter) {
  return request({
    url: '/v2/boss/project/cost/config/import',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
export function listvisitVersion (parameter) {
  return request({
    url: '/v2/boss/project/cost/config/listvisitVersion',
    method: 'post',
    data: parameter
  })
}
export function getPtsTypes (parameter) {
  return request({
    url: '/v2/boss/project/cost/config/ptsTypes',
    method: 'post',
    data: parameter
  })
}
export function expenseExport (parameter) {
  return request({
    url: '/v2/boss/project/cost/config/export',
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}
export function researchCostList (parameter) {
  return request({
    url: '/boss/project/cost/config/researchCostList',
    method: 'get',
    params: parameter
  })
}
export function updateResearchCost (parameter) {
  return request({
    url: '/boss/project/cost/config/updateResearchCost',
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function apiGetExportsTemplate (parameter) {
  return request({
    url: '/v2/boss/project/cost/config/exportPtsTemplate',
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}
